import http from '../http'

const api = '/erp/supplier/order'

export function get(params) {
  return http.get(api, {
    params
  })
}

export function update(data) {
  return data.id ? http.put(api + '/' + data.id, data) : http.post(api, data)
}

export function goods(goods_id, params) {
  return http.get(api + '/goods/' + goods_id, {
    params
  })
}